#有如下一个字符串变量logs，请统计出每种请求类型的数量（提示：空格分割的第2列是请求类型），得到如下输出：
##POST 2
#GET 3

#下边是logs变量：
#logs = '''
#111.30.144.7 "POST /mock/login/?t=GET HTTP/1.1" 200 
#111.30.144.7 "Get /mock/users/?t=POST HTTP/1.1" 200 
#111.13.100.92 "Post /mock/login/ HTTP/1.1" 200 
#223.88.60.88 "GET /mock/users/?t=POST HTTP/1.1" 200 
#111.30.144.7 "GET /mock/users/ HTTP/1.1" 200 
#'''

logs = '''
111.30.144.7 "POST /mock/login/?t=GET HTTP/1.1" 200 
111.30.144.7 "Get /mock/users/?t=POST HTTP/1.1" 200 
111.13.100.92 "Post /mock/login/ HTTP/1.1" 200 
223.88.60.88 "GET /mock/users/?t=POST HTTP/1.1" 200 
111.30.144.7 "GET /mock/users/ HTTP/1.1" 200 
'''

get_count = 0
post_count = 0
# 格式化 logs 字符串
log_format = logs.lower().split('\n')[1:-1] 
#print(log_format)
for log in log_format:
    #print(log.split(' ')[1])
    # 取到method名称
    if log.split(' ')[1].strip('"') == 'get':
        get_count += 1
    if log.split(' ')[1].strip('"') == 'post':
        post_count += 1
print('POST {}'.format(post_count))
print('GET {}'.format(get_count))